import { http } from '@/utils/http/axios';

/**
 * 列表
 */
export function customerLists(params) {
  return http.request({
    url: '/api/customer/lists',
    method: 'GET',
    params
  });
}

/**
 * 详情
 */
export function customerInfo(params) {
  return http.request({
    url: '/api/customer/info',
    method: 'GET',
    params
  });
}

/**
 * 新增客户
 */
export function customerAdd(data) {
  return http.request({
    url: '/api/customer/add',
    method: 'POST',
    data
  });
}

/**
 * 编辑
 */
export function customerUpdate(data) {
  return http.request({
    url: '/api/customer/update',
    method: 'POST',
    data
  });
}

/**
 * 删除
 */
export function customerDelete(data) {
  return http.request({
    url: '/api/customer/delete',
    method: 'POST',
    data
  });
}

/**
 * 统计
 */
export function customerStatic(params) {
  return http.request({
    url: '/api/customer/static',
    method: 'GET',
    params
  });
}

/**
 * 修改客户密码
 */
export function customerUpdatePass(data) {
  return http.request({
    url: '/api/customer/update_pass',
    method: 'POST',
    data
  });
}

/**
 * 续期
 */
export function customerRenew(data) {
  return http.request({
    url: '/api/customer/renew',
    method: 'POST',
    data
  });
}

/**
 * 转正式
 */
export function customerFormal(data) {
  return http.request({
    url: '/api/customer/formal',
    method: 'POST',
    data
  });
}

/**
 * 销售select列表
 */
export function saleSelect(params) {
  return http.request({
    url: '/api/sale/select',
    method: 'GET',
    params
  });
}

/**
 * 销售列表
 */
export function saleLists(params) {
  return http.request({
    url: '/api/sale/lists',
    method: 'GET',
    params
  });
}

/**
 * 新增销售
 */
export function saleAdd(data) {
  return http.request({
    url: '/api/sale/add',
    method: 'POST',
    data
  });
}

/**
 * 详情
 */
export function saleInfo(params) {
  return http.request({
    url: '/api/sale/info',
    method: 'GET',
    params
  });
}

/**
 * 新增销售
 */
export function saleUpdate(data) {
  return http.request({
    url: '/api/sale/update',
    method: 'POST',
    data
  });
}

/**
 * 销售删除
 */
export function saleDelete(data) {
  return http.request({
    url: '/api/sale/delete',
    method: 'POST',
    data
  });
}

/**
 * oss配置
 */
export function ossConfig(data) {
  return http.request({
    url: '/api/site/v2/config',
    method: 'POST',
    data
  });
}

/**
 * oss配置信息
 */
export function ossConfigInfo(params) {
  return http.request({
    url: '/api/site/v2/config_info',
    method: 'GET',
    params
  });
}
